﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NMF.Optimizations
{
    public class StaticModificationPattern : ModificationPattern
    {
        private HashSet<StaticModification> modifications;

        public StaticModificationPattern(IEnumerable<StaticModification> modifications)
        {
            if (modifications == null) throw new ArgumentNullException("modification");

            this.modifications = new HashSet<StaticModification>(modifications);
            foreach (var mod in this.modifications)
            {
                mod.Parent = this;
            }
        }

        public override IEnumerable<IOptimizationModification> GetCurrentModifications()
        {
            return modifications;
        }

        public ICollection<StaticModification> Modifications
        {
            get
            {
                return modifications;
            }
        }
    }
}
